
<%@ page import="com.opeace.Form" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'form.label', default: 'Form')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-form" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		
        <h1><g:message code="${formInstance.name}"/></h1>
		<table align="center" width="100%">
                  <tr>

		<td align="left" width="50%" style="vertical-align: top;">
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list form">
			
				<g:if test="${formInstance?.contents}">
				<li class="fieldcontain">
					<span id="contents-label" class="property-label"><g:message code="form.contents.label" default="Contents" /></span>
					
						<span class="property-value" aria-labelledby="contents-label">${formInstance?.contents}</span>
					
				</li>
				</g:if>
                          </br>
				<g:if test="${formInstance?.dateCreated}">
				<li class="fieldcontain">
					<span id="dateCreated-label" class="property-label"><g:message code="form.dateCreated.label" default="Date Created" /></span>
					
						<span class="property-value" aria-labelledby="dateCreated-label"><g:formatDate format="MM-dd-yyyy" date="${formInstance?.dateCreated}" /></span>
					
				</li>
				</g:if>
                          </br>
				<g:if test="${formInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="form.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${formInstance}" field="name"/></span>
					
				</li>
				</g:if>
                          
                          <g:if test="${formInstance?.persons}">
				<li class="fieldcontain">
					<span id="persons-label" class="property-label"><g:message code="form.persons.label" default="Persons" /></span>
					
						<g:each in="${formInstance.persons}" var="p">
						<span class="property-value" aria-labelledby="persons-label"><g:link controller="personForm" action="show" id="${p.id}">${p?.person.firstName.encodeAsHTML()} ${p?.person.lastName.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${formInstance?.id}" />
					<g:link class="edit" style="font-size:17px;" action="edit" id="${formInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</td>
                  </tr>

	</table>
         <div class="nav" role="navigation">
			<ul>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
			</ul>
                      </div>
	</body>
</html>
